/** @file ftimer.h
 */
#ifndef _FTIMER_H_
#define _FTIMER_H_

#include "widget.h"
#include "signal.h"
#include "frgui_port.h"

typedef enum {
    SIGNAL_FTIMER_EXPIRED=0,
    SIGNAL_FTIMER_MAX
} timer_signal;


class FTimer
{
public:
    FTimer();
    
    Signal signal[SIGNAL_FTIMER_MAX];

    int expire;
    bool active;
    FTimer *next;

    void start();
    void stop();
    void cancel();

    void operator delete(void *t){  port_free(t);  }
    void *operator new(unsigned int len){return port_malloc(len);}

    
};


#endif


